<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en">
<ui:composition>
<script type="text/javascript">
 //<![CDATA[
 function collectData(formId){
 	
 	var fmPanel=Ext.getCmp(formId);
 	if(!fmPanel.maskDisabled){
 		Ext.get(formId).mask("submiting...", "x-mask-loading" );
 	}
 	var form=fmPanel.getForm();
 	var values=form.getValues();
 	formId+='_h';
 	for(obj in values){
 		var ele=document.getElementById(formId+":"+obj);
 		if(ele){
 			ele.value=values[obj];
 		}
 	}
 }
 Ext.onReady(function(){
	Ext.QuickTips.init();
	var ${formConfig.id}_config=#{ext:getConfigDefByMap(formConfig)};
	${formConfig.id}_config.items=[#{ext:getConfigDefByList(fields)}];
	${formConfig.id}_config.buttons=[#{ext:getConfigDefByList(buttons)}];
	
 	var #{formConfig.id}=new Ext.FormPanel(${formConfig.id}_config);
 	});
 	//]]>
	 </script>

</ui:composition>

</html>
